<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Login
 *
 * @author neozilon
 */
class Admin_Form_Login extends Zend_Form {

    public function  __construct($options = null) {
        $this->setName("login")
                ->setAction("/admin/login/process")
                ->setMethod("post");

        $username = new Zend_Form_Element_Text('username');
        $username->setLabel("Usuario: ")
            ->setRequired(true)
            ->setAttrib('class', 'text-input');

        $passwd = new Zend_Form_Element_Password('passwd');
        $passwd->setLabel("Contrasena: ")
                ->setRequired(true)
                ->setAttrib('class', 'text-input');

        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel('Ingresar')
                ->setAttrib('class', 'button')
                ->setAttrib('escape', false);

        $this->addElements(array($username, $passwd, $submit));

       
        $this->setElementDecorators(array(
                'viewHelper',
                'label',
                array('htmlTag',array('tag' =>'p'))

        ));
        
        $this->addDecorator('formElements');
        $this->submit->removeDecorator('Label');
        $this->addDecorator('form');

    }

}